print(123)
List = {first = 0, last = -1}
function List.new()
  return {first = 0, last = -1}
end
function List.pushlast(list, value)
  local last = list.last + 1
  list.last = last
  list[last] = value
end
function List.popfirst(list)
  local first = list.first
  if first > list.last then error("list is empty") end
  local value = list[first]
  list[first] = nil
  list.first = first +1
  return value
end
List:pushlast(10)
first = 234
List[first] = 111
print(List.first)
print(List["first"])
